#ifndef _GENERATORS_H_
#define _GENERATORS_H_


#include<cstdlib>
#include<utility>

int getRandomPositiveNumber(){
	return rand()*(rand() / 4);
}

std::pair<int,int> getRandomEdge(int vertexNum){
	int fromVertex = getRandomPositiveNumber()%vertexNum;
	int toVertex = getRandomPositiveNumber()%vertexNum;
	return{ fromVertex, toVertex };
}

int getRandomNumberOnSegment(int leftBorder, int rightBorder){
	return leftBorder + (getRandomPositiveNumber()) % (rightBorder - leftBorder);
}

std::pair<int, int> getRandomIndexes(int vertexNum){
	int fromIndex = getRandomPositiveNumber() % (vertexNum - 1);
	int toIndex = getRandomNumberOnSegment(fromIndex + 1, vertexNum);
	return{ fromIndex, toIndex };
}
#endif
